﻿
<table class="popup">
    <tr>
        <td class="pTL trans">
        </td>
        <td class="pT">
        </td>
        <td class="pTR trans">
        </td>
    </tr>
    <tr>
        <td class="pML">
        </td>
        <td class="pM">
            <div class="popupTop">
                <span class="circleL"></span><span class="circleR"></span>
                <h4 class="popupTitle">
                    <label id="MsgBoxTitle">
                    </label>
                </h4>
                <a href="javascript:void(0)" class="close" id="MsgBoxClose" onclick="jQuery.facebox.close(this);ReturnValue('Cancel');"
                    title="Close Popup Window"></a>
            </div>
            <div class="popupBody">
                <p id="MsgBoxPrompt" class="popupTips tipIconInfoBlue">
                </p>
                <div class="popupBtn" width="100%">
                    <a href="javascript:void(0)" id="MsgBtnOK" onclick="jQuery.facebox.close(this);ReturnValue('OK');"
                        class="buttonB"><span>OK</span></a> <a href="javascript:void(0)" id="MsgBtnYes" onclick="jQuery.facebox.close(this);ReturnValue('Yes');"
                            class="buttonB"><span>Yes</span></a> <a href="javascript:void(0)" id="MsgBtnNo" onclick="jQuery.facebox.close(this);ReturnValue('No');"
                                class="buttonC"><span>No</span></a> <a href="javascript:void(0)" id="MsgBtnDelete"
                                    onclick="jQuery.facebox.close(this);ReturnValue('Delete');" class="buttonB"><span>Delete</span></a>
                    <a href="javascript:void(0)" id="MsgBtnCancel" onclick="jQuery.facebox.close(this);ReturnValue('Cancel');"
                        class="buttonC"><span>Cancel</span></a>
                </div>
            </div>
            <div class="popupBottom">
                <span class="circleL"></span><span class="circleR"></span>
            </div>
        </td>
        <td class="pMR">
        </td>
    </tr>
    <tr>
        <td class="pBL trans">
        </td>
        <td class="pB">
        </td>
        <td class="pBR trans">
        </td>
    </tr>
</table>

<script type="text/javascript">
    $(".facebox").draggable({ handle: '.popupTop', cancel: '.popupBody' });
</script>

<script type="text/javascript">
    if (MsgBoxPara.MsgBoxTitle == "" || MsgBoxPara.MsgBoxTitle == undefined) {

        $("#MsgBoxTitle").html("Message");
    }
    else {
        document.getElementById("MsgBoxTitle").innerHTML = MsgBoxPara.MsgBoxTitle;

        $("#MsgBoxTitle").html(MsgBoxPara.MsgBoxTitle);
    }

    $("#MsgBoxPrompt").html(MsgBoxPara.MsgBoxPrompt)
    $(".popupBtn >a").hide();

    if (MsgBoxPara.MsgBoxType == "Delete Confirm") {
        if (MsgBoxPara.MsgBoxTitle == "") {

            $("#MsgBoxTitle").html("");
        }
        if (MsgBoxPara.MsgBoxPrompt == "") {
            $("#MsgBoxPrompt").html("");
        }

        $("#MsgboxBtnDelete").show();
        $("#MsgboxBtnDelete").focus();
        $("#MsgboxBtnCancel").show();
    }
    else if (MsgBoxPara.MsgBoxType == "Yes or No") {

        $("#MsgBtnYes").show();
        $("#MsgBtnYes").focus();
        $("#MsgBtnNo").show();
    }
    else {

        $("#MsgBtnOK").show();
        $("#MsgBtnOK").focus();
    }

    $(".facebox").draggable({ handle: '.popupTitle', cancel: '.popupBody' });
    function ReturnValue(value) {
        if (value == "Cancel" || value == "No") {
            if (MsgBoxPara.MsgBoxCancelFunction != "") {
                eval(MsgBoxPara.MsgBoxCancelFunction);
            }
        }
        else if (value == "OK" || value == "Yes") {
            if (MsgBoxPara.MsgBoxReturnFunction != "") {
                eval(MsgBoxPara.MsgBoxReturnFunction);
            }
        }
    }
</script>

